DROP TABLE IF EXISTS jms_dim.dim_lmdm_sys_tail_code;
CREATE EXTERNAL TABLE jms_dim.dim_lmdm_sys_tail_code(
 ID bigint comment "",  --NUMBER(11)
 NAME string comment "单元区域名称",  --NVARCHAR2(50)
 CODE string comment "单元区域编码",  --NVARCHAR2(20)
 TYPE smallint comment "单元区域类型",  --NUMBER(4)
 NETWORK_ID bigint comment "网点ID",  --NUMBER(11)
 NETWORK_CODE string comment "网点编码",  --NVARCHAR2(20)
 PROVINCE_ID bigint comment "省份id",  --NUMBER(11)
 CITY_ID bigint comment "城市id",  --NUMBER(11)
 AREA_ID bigint comment "区县id",  --NUMBER(11)
 RECEIVE_COORDINATES string comment "收件范围电子围栏",  --NCLOB
 DISPATCH_COORDINATES string comment "派件范围电子围栏",  --NCLOB
 IS_HAS_MAP smallint comment "是否有电子围栏：1是，2否",  --NUMBER(4)
 IS_ENABLE smallint comment "是否启用:1启用,2不启用",  --NUMBER(4)
 IS_DELETE smallint comment "是否删除:1未删除,2已删除",  --NUMBER(4)
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 UPDATE_BY bigint comment "最后更新人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人名称",  --NVARCHAR2(50)
 UPDATE_BY_NAME string comment "最后修改人名称",  --NVARCHAR2(50)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 VERSION string comment "版本号",  --NVARCHAR2(10)
 SORT smallint comment "排序"  --NUMBER(4)
 )
 COMMENT '运单变化记录表维表'
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_dim.db/external/dim_lmdm_sys_tail_code'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );